#ifndef MYLABEL_H
#define MYLABEL_H

#include <QLabel>
#include <QMouseEvent>
#include <vector>
#include "LineShadow.h"
class MyLabel:public QLabel
{
    Q_OBJECT
public:
    MyLabel(QWidget *parent);
    std::shared_ptr<QImage> loadImage(const cv::Mat& image);
    void addImage(const cv::Mat& img){
        lineShadow.addImages(img);
    }
    void clearImage(){
        lineShadow.clearImages();
    }

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

private:


    LineShadow lineShadow;
signals:
    void currentPosition(const QPoint &point);
    void sendMask(const cv::Mat& mask);

public slots:
    void saveMask();

};

#endif // MYLABEL_H
